package com.hlkj.pay.dto.ad.query;
/*
 * Hlpay-Plus aggregate payment system.
 * Copyright (c) 2024-2025 Hlpay Team Copyright has the right of final interpretation.
 */

import com.hlkj.framework.common.util.json.JsonUtils;
import lombok.Data;
/**
 * @author HlpayTeam
 * @date 2024/10/23 14:35
 */
@Data
public class HlPayOrderQueryResultDto {
	
	/**
	 * code : 1 msg : 请求成功 sign_type : RSA2 ins_id : M856437352 app_id :
	 * APP_896564793562 data :
	 * {"ins_id":"M856437352","app_id":"APP_896564793562","mch_order_no":"D20241023171359242849072","pay_order_id":"202410231714005658","mch_refund_no":"T20241023181556601422251","refund_amount":0.01,"refund_reason":"测试退款","refund_order_id":"202410231815587088","state":2}
	 * sign :
	 * McWTG6UDq80zDHjIFjB1eseYrDDOu1K8Hjqs/abv3gn9rhr5LxjWF+iMLmURZTyeFlwPvGYh9z51hgJlVI/En1KwLGKtX6zhGK53x9UlkW1D8AwbdolEKXtQdSoUer8r2ab8qU1for9POfPQ/TkxZfzoDGlqJ71sLoW4UG8avgJPtml2e6yxzplnTPsXTjfvLGLNKkqrZbCtO7rIE0L3oySHkcplzjS4VH9mS5eSwexv0aD/xpuT9tLlo0mts371KTt/S8jf7ysIYHjiPJTNqtKkNyVIcb6TbaG9AYqIfNxF4t9TEJ2j8KyC9RaH3UadfMLeDeD2EY1hCPSvrx+I8w==
	 */
	
	private Integer code;
	
	private String msg;
	
	private String sign_type;
	
	private String ins_id;
	
	private String app_id;
	
	/**
	 * ins_id : M856437352 app_id : APP_896564793562 mch_order_no :
	 * D20241023171359242849072 pay_order_id : 202410231714005658 mch_refund_no :
	 * T20241023181556601422251 refund_amount : 0.01 refund_reason : 测试退款
	 * refund_order_id : 202410231815587088 state : 2
	 */
	
	private Object data;
	
	private String sign;
	@Data
	public static class PayOrderQueryData{
		
		/**
		 * ins_id : M856437352
		 * app_id : APP_896564793562
		 * mch_order_no : D20241031103247259106820
		 * pay_order_id : 202410311032458898
		 * ins_order_sn :
		 * channel_order_sn :
		 * amount : 0.65
		 * mch_channel_id : 46
		 * in_code : alipay
		 * way_code : offAlipayQr
		 * sp_sn : S317554102
		 * way_scene : 1
		 * way_type : ALIPAY
		 * com_fee_amount : 0.01
		 * com_fee_rate : 0.60
		 * channe_fee_amount : 0.01
		 * channe_fee_rate : 0.60
		 * settlement_amt : 0.63
		 * subject : 1A推啊话费1
		 * body : 1A推啊话费1
		 * success_time : null
		 * state : 3
		 */
		
		private String ins_id;
		private String app_id;
		private String mch_order_no;
		private String pay_order_id;
		private String ins_order_sn;
		private String channel_order_sn;
		private String amount;
		private String mch_channel_id;
		private String in_code;
		private String way_code;
		private String sp_sn;
		private String way_scene;
		private String way_type;
		private String com_fee_amount;
		private String com_fee_rate;
		private String channe_fee_amount;
		private String channe_fee_rate;
		private String settlement_amt;
		private String subject;
		private String body;
		private String success_time;
		// 订单状态，0=支付失败，1=初始化，2=支付中，3=支付成功，4=已撤销，5=订单关闭
		private String state;
		
	}
	
	public static void main(String[] args) {
		String json="{\"code\":0,\"msg\":\"订单不存在\",\"sign_type\":\"RSA2\",\"ins_id\":\"M856437352\",\"app_id\":\"APP_896564793562\",\"data\":[],\"sign\":\"BmW6WZCOFX4pju9kJUhDOIG9zrVTR5beFgXad1UqBiLUo1uhIq2NE9x+iQL67M8onFwcJCnHf2Bt6j9ezd2xAhTBaaQHDcL\\/Yu8k9Le2olanXUYsnjpAt2qTmyTDyADysY2bZ0RjlN1AfqaSxpaNq2ZzRiXhxHHL1d4TBntUz7RO+jzOt8PA055\\/YGvpKEvMbUQBZnNVN4ShscfnFH\\/LYkWBmkrAxRpFzIspsDv\\/6fDIYfWzqPwIuTkR1vhRqmxM64xcV1RC8mpcBe91AAqG+HdpEXQ0nMNc2bu5rj6mWj3aSjmi6zA9qrnlm6ZVdbwKcZZRvbWl1Fzm4vVxgXvY5Q==\"}";
		System.out.println(JsonUtils.parseObject(json, HlPayOrderQueryResultDto.class));
	}
}
